package top.malaoshi.controller;

import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
import top.malaoshi.model.JsonResult;

@RestController
public class LoginCtrl {

//    @RequestMapping(value = "/login",method = RequestMethod.POST)
    @PostMapping(value = "/login")
    public JsonResult login(String username,String password){
        System.out.println("username："+username);
        System.out.println("password："+password);

//        return "success";
        JsonResult res=new JsonResult(0,"登录成功！");
        return res;
    }
}
